<!-- app/View/Users/add.ctp -->
<div class="users form">
<?php
$departmentarray = array();
foreach($departments as $department){
	$departmentarray[$department['Department']['id']] = $department['Department']['title'];
}
//print_r($departmentarray); ?>

<?php echo $this->Form->create('User'); ?>
    <fieldset>
        <legend><?php echo __('Add User'); ?></legend>
        <?php echo $this->Form->input('username');
        echo $this->Form->input('password');
		echo $this->Form->input('department_id', array('label' => 'Department', 'options' => $departmentarray));
		echo $this->Form->input('cost', array('label' => 'Cost($ per Hour)'));
		echo $this->Form->input('role', array('options' => 
			array('registered'=>'Registered', 'managers'=>'Managers', 'special'=>'Special', 'admin'=>'Admin', 'superadmin'=>'Super Admin')));
		
    ?>
    <ul>
    <li><strong>Registered</strong><em>(all other employees) can access</em>: add/edit timesheets, change password</li>
    <li><strong>Managers</strong><em>(Team leads) can access</em>: view department timesheets, change password, view/add/edit/delete clients, view reports</li>
    <li><strong>Special</strong><em>(e.g CEO) can access</em>: view all timesheets, change password, view reports</li>
    <li><strong>Admin</strong><em>(e.g HR) can access</em>:add/edit timesheets, view/add/edit/delete leave days, change password</li>
    <li><strong>Super Admin</strong><em>(IT) can access</em>: All the sections of the portal</li>
    </ul>
    </fieldset>
<?php echo $this->Form->end(__('Submit')); ?>
</div